#pragma once

#include "stdafx.h"
#include "sphere.h"
#include "material.h"
#include "color.h"

#define	ANTIALIASING_ALGORITHMS 3
#define DIVISION_ALGORITHMS 4
#define	MAX_ANTIALIASING_MULTIPLYIER 10
#define MAX_REFLECTION_PRECISON 6
#define MAX_REFRACION_DEPTH 6
#define MAX_PHOTONS 100000000
#define MAX_SAMPLE_RADIUS 10
#define MIN_FOV 1
#define MAX_FOV 180
#define CAMERA_TYPES 3

class renderoptions
{
public:

	renderoptions();
	renderoptions(unsigned int X, unsigned int Y);
	renderoptions(std::string fileName);
	~renderoptions();
protected:

	//renderer
	unsigned int width;
	unsigned int height;

	unsigned int antialiasing; //0-none, 1-linear, 2-random, 3-adaptive
	unsigned int antialiasingMultiplier; //0-off, 1x, 2x etc
	bool lights;
	bool shades;
	bool reflections;
	unsigned int reflectionsPrecision; //1x, 2x, etc
	bool refractions;
	unsigned int refracionDepth;
	bool photonMaping;
	unsigned int photonCount;
	unsigned int photonsPerSample;
	double	photonSampleRadius;

	
	//camera
	float FOV;
	unsigned int cameraType;	//0-perspective, 1-orto, 2-pinHole, 3-fishEye
	double clipping;

	//scene
	bool sceneDivision;
	unsigned int divisionAlgorithm; //0-off, 1-8tree, 2-KdTree, 3-BSP, 4-bounding
	bool cornelBox;
	material backgroundMaterial;

	//picture
	double pixelAspectRatio;

	//misc functions
	void standardSet();

public:
	//set Fuctions
	void setWidth(unsigned int X);
	void setHeight(unsigned int Y);
	void setAntialasingAlgorithm(unsigned int no);
	void setAntialasingMultiplyier(unsigned int mul);
	void lighsOnOff(bool choice);
	void shadesOnOff(bool choice);
	void reflectionsOnOff(bool choice);
	void setReflectionsPrecision(unsigned int precision);
	void refractionsOnOff(bool choice);
	void setRefractionsDepth(unsigned int depth);
	void photonMapingOnOff(bool choice);
	void setPhotonCount(unsigned int n);
	void setPhotonsPerSample(unsigned int n);
	void setPhotonSampleRadius(double r);	
	void setFOV(float fov);
	void setCameraType(unsigned int type);
	void setClippingDepth(double depth);
	void sceneDivisionOnOff(bool choice);
	void setDivisionAlgorithm(unsigned int algorithm);
	void cornelBoxOnOff(bool choice);
	void setbackgroundMaterial(material background);
	void setpixelAspectRatio(double AR);

	//get Fuctions
	unsigned int	getWidth();
	unsigned int	getHeight();
	unsigned int	getAntialasingAlgorithm();
	unsigned int	getAntialasingMultiplyier();
	bool			getLighs();
	bool			getShades();
	bool			getReflections();
	unsigned int	getReflectionsPrecision();
	bool			getRefractions();
	unsigned int	getRefractionsDepth();
	bool			getPhotonMapping();
	unsigned int	getPhotonCount();
	unsigned int	getPhotonsPerSample();
	double			getPhotonSampleRadius();
	float			getFOV();
	unsigned int	getCameraType();
	double			getClippingDepth();
	bool			getSceneDivision();
	unsigned int	getDivisionAlgorithm();
	bool			getCornelBox();
	material		getBackgroundMaterial();
	double			getpixelAspectRatio();


};